using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class GeneralSetRequest : GeneratedMessageLite<GeneralSetRequest, GeneralSetRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<GeneralSetRequest, GeneralSetRequest.Builder>
		{
			private bool resultIsReadOnly;
			private GeneralSetRequest result;
			protected override GeneralSetRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override GeneralSetRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override GeneralSetRequest DefaultInstanceForType
			{
				get
				{
					return GeneralSetRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public int SetType
			{
				get
				{
					return this.result.SetType;
				}
				set
				{
					this.SetSetType(value);
				}
			}
			public string SetValue
			{
				get
				{
					return this.result.SetValue;
				}
				set
				{
					this.SetSetValue(value);
				}
			}
			public Builder()
			{
				this.result = GeneralSetRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(GeneralSetRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private GeneralSetRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					GeneralSetRequest other = this.result;
					this.result = new GeneralSetRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override GeneralSetRequest.Builder Clear()
			{
				this.result = GeneralSetRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override GeneralSetRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new GeneralSetRequest.Builder(this.result);
				}
				return new GeneralSetRequest.Builder().MergeFrom(this.result);
			}
			public override GeneralSetRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override GeneralSetRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is GeneralSetRequest)
				{
					return this.MergeFrom((GeneralSetRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override GeneralSetRequest.Builder MergeFrom(GeneralSetRequest other)
			{
				return this;
			}
			public override GeneralSetRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override GeneralSetRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(GeneralSetRequest._generalSetRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = GeneralSetRequest._generalSetRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasSetType = input.ReadInt32(ref this.result.setType_);
							continue;
						}
						if (num3 == 26u)
						{
							this.result.hasSetValue = input.ReadString(ref this.result.setValue_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public GeneralSetRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public GeneralSetRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public GeneralSetRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public GeneralSetRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public GeneralSetRequest.Builder SetSetType(int value)
			{
				this.PrepareBuilder();
				this.result.hasSetType = true;
				this.result.setType_ = value;
				return this;
			}
			public GeneralSetRequest.Builder ClearSetType()
			{
				this.PrepareBuilder();
				this.result.hasSetType = false;
				this.result.setType_ = 0;
				return this;
			}
			public GeneralSetRequest.Builder SetSetValue(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasSetValue = true;
				this.result.setValue_ = value;
				return this;
			}
			public GeneralSetRequest.Builder ClearSetValue()
			{
				this.PrepareBuilder();
				this.result.hasSetValue = false;
				this.result.setValue_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int SetTypeFieldNumber = 2;
		public const int SetValueFieldNumber = 3;
		private static readonly GeneralSetRequest defaultInstance;
		private static readonly string[] _generalSetRequestFieldNames;
		private static readonly uint[] _generalSetRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasSetType;
		private int setType_;
		private bool hasSetValue;
		private string setValue_ = "";
		private int memoizedSerializedSize = -1;
		public static GeneralSetRequest DefaultInstance
		{
			get
			{
				return GeneralSetRequest.defaultInstance;
			}
		}
		public override GeneralSetRequest DefaultInstanceForType
		{
			get
			{
				return GeneralSetRequest.DefaultInstance;
			}
		}
		protected override GeneralSetRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public int SetType
		{
			get
			{
				return this.setType_;
			}
		}
		public string SetValue
		{
			get
			{
				return this.setValue_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasSetType && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasSetType)
				{
					num += CodedOutputStream.ComputeInt32Size(2, this.SetType);
				}
				if (this.hasSetValue)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.SetValue);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private GeneralSetRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] generalSetRequestFieldNames = GeneralSetRequest._generalSetRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, generalSetRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasSetType)
			{
				output.WriteInt32(2, generalSetRequestFieldNames[1], this.SetType);
			}
			if (this.hasSetValue)
			{
				output.WriteString(3, generalSetRequestFieldNames[2], this.SetValue);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasSetType)
			{
				num ^= this.setType_.GetHashCode();
			}
			if (this.hasSetValue)
			{
				num ^= this.setValue_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			GeneralSetRequest generalSetRequest = object_0 as GeneralSetRequest;
			return generalSetRequest != null && (this.hasBaseRequest == generalSetRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(generalSetRequest.baseRequest_))) && (this.hasSetType == generalSetRequest.hasSetType && (!this.hasSetType || this.setType_.Equals(generalSetRequest.setType_))) && (this.hasSetValue == generalSetRequest.hasSetValue && (!this.hasSetValue || this.setValue_.Equals(generalSetRequest.setValue_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<GeneralSetRequest, GeneralSetRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<GeneralSetRequest, GeneralSetRequest.Builder>.PrintField("SetType", this.hasSetType, this.setType_, writer);
			GeneratedMessageLite<GeneralSetRequest, GeneralSetRequest.Builder>.PrintField("SetValue", this.hasSetValue, this.setValue_, writer);
		}
		public static GeneralSetRequest ParseFrom(byte[] data)
		{
			return GeneralSetRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private GeneralSetRequest MakeReadOnly()
		{
			return this;
		}
		public static GeneralSetRequest.Builder CreateBuilder()
		{
			return new GeneralSetRequest.Builder();
		}
		public override GeneralSetRequest.Builder ToBuilder()
		{
			return GeneralSetRequest.CreateBuilder(this);
		}
		public override GeneralSetRequest.Builder CreateBuilderForType()
		{
			return new GeneralSetRequest.Builder();
		}
		public static GeneralSetRequest.Builder CreateBuilder(GeneralSetRequest prototype)
		{
			return new GeneralSetRequest.Builder(prototype);
		}
		static GeneralSetRequest()
		{
			GeneralSetRequest.defaultInstance = new GeneralSetRequest().MakeReadOnly();
			GeneralSetRequest._generalSetRequestFieldNames = new string[]
			{
				"BaseRequest",
				"SetType",
				"SetValue"
			};
			GeneralSetRequest._generalSetRequestFieldTags = new uint[]
			{
				10u,
				16u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.GeneralSetRequest.Descriptor, null);
		}
	}
}
